<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="col-md-12">
	<div class="panel-search">
		<form class="form-inline" action="/ordert/AmazonlistTo"></form>
		<div class="btn-div">
			<div class="div-left">
				<label>亚马逊账号：</label><span>全部</span><span>账号1</span><span>账号2</span><span>账号3</span><br>


				<div class="date-pickerr" style="height: 30px; margin-top: 18px;">

					<div class="input-icon right" style="float: left;">
						<label>销售日期：</label>
					</div>

					<div class="input-icon right"
						style="width: 200px; float: left; margin-left: 25px;">
						<i class="fa"></i>
						<div class="input-group date date-picker"
							data-date-format="yyyy-mm-dd">
							<input type="text" class="form-control" id="startDate" readonly
								required maxlength="11" /> <span class="input-group-btn">
								<button class="btn default" type="button">
									<i class="fa fa-calendar"></i>
								</button>
							</span>
						</div>
					</div>

					<div class="input-icon right"
						style="width: 30px; float: left; margin: 1px 18px 1px 28px;">
						<label style="font-size: 16px;">至</label>
					</div>

					<div class="input-icon right" style="width: 200px; float: left;">
						<i class="fa"></i>
						<div class="input-group date date-picker"
							data-date-format="yyyy-mm-dd">
							<input type="text" class="form-control" id="endDate" readonly
								required maxlength="11" /> <span class="input-group-btn">
								<button class="btn default" type="button">
									<i class="fa fa-calendar"></i>
								</button>
							</span>
						</div>
					</div>
					<div class="input-icon right"
						style="float: left; margin: 1px 15px 1px 18px;">
						<label style="font-size: 16px;">之前</label>
					</div>

					<div class="input-icon right"
						style="float: left; margin: 1px 15px 1px 28px;">
						<button type="button" class="btn btn-primary"
							onclick="searchForList()">
							<i class="fa fa-search"></i>
							<spring:message code="btn.search"></spring:message>
						</button>
					</div>
				</div>


				<br> <br>

				<!-- <button class="btn btn-primary" onclick="modelShow(1)">导出发货单</button> -->

				<button class="btn btn-primary" onclick="modelShow(2)">导出发货单</button>
				<button class="btn btn-primary" onclick="search()">刷新</button>


			</div>
			<div class="div-right">
				<%-- <button type="button" class="btn btn-primary" onclick="search()">
					<i class="fa fa-search"></i>
					<spring:message code="btn.search"></spring:message>
				</button>
				<button type="button" class="btn btn-default" onclick="reset()">
					<i class="fa fa-repeat"></i>
					<spring:message code="btn.reset"></spring:message>
				</button> --%>
			</div>
		</div>
	</div>
	<div class="panel-content"></div>
</div>
<style type="text/css">
.div-left label {
	font-size: 16px;
}

.div-left span {
	margin-left: 20px;
	font-size: 16px;
}

.div-left span.active {
	background-color: #4F94CD;
	color: #ffffff;
	border: 3px solid #4F94CD;
	border-radius: 15px;
}
</style>
<script type="text/javascript"
	src="<c:url value="/static/custom/datepicker-util.js"></c:url>"></script>
<script type="text/javascript">
	function searchForList() {
		var startDate = $("#startDate").val();
		var endDate = $("#endDate").val();

		if (startDate == "" || endDate == "") {
			alert('请选择查询日期!')
		} else {

			$.ajax({
				type : 'post',
				url : webRoot + '/ordert/AmazonlistTo',
				data : {
					'start' : startDate,
					'end' : endDate
				},
				success : function(data) {

					$(".panel-content").html(data);

				}
			})

		}

	}

	$(function() {
		search();

		$(".div-left span").click(function() {
			$(this).toggleClass('active');
		})
	});
</script>